#!/usr/bin/env python
# -*- coding: utf-8 -*-
#  create_admin_user.py
#  description

#  Created by zhouzongli633 on 2020/7/6 3:31 下午.
#  Copyright ©Intellectus All rights reserved.
from Common import bcrypt


def add_admin_user(user, pwd):
    print(user)
    print(pwd)


def check_admin_user(user, pwd_crypt):
    pwd = '123456'
    it_pass = bcrypt.Bcrypt.check(pwd, pwd_crypt)
    print(it_pass)
    return it_pass


if __name__ == "__main__":
    user = "nicu2home+smart@gmail.com"
    pwd = "123456"

    en_password = bcrypt.Bcrypt.encrypt(pwd)
    add_admin_user(user, en_password)
    check_admin_user(user, en_password)
